// 添加人员控制器
define('managePeopleAddController', ['angular'], function (angular) {
    var module = angular.module('controllers');
    module.controller('managePeopleAddController', ['$scope','$filter','$location','userServers',function ($scope,$filter,$location,userServers) {
        $scope.formData={};
        $scope.managePeopleAddForm=function(info){
        	if(info){
	        	$scope.formData=$filter('simplifyJsonFilter')($scope.formData);
	        	userServers.addUser($scope.formData).then(function(data){
	        		if(data.data){
	        			alert("添加成功");
	        			$location.path("/Manage/manage_people");
	        		}else{
	        			alert("添加失败");
	        		}
	        	});
        	}
        };
    }]);
});